-- Everything is unconfirmed of working except for the following:
 	-- player rpname.
	-- player userid.
function GetPlayerInfo( p )
	if not p or p == "" then return nil end
	for k,v in pairs(player.GetAll()) do
		
		if p == v:SteamID() or p == string.gsub(v:SteamID(), ":", "_") then
			return v;
		end
		if tonumber(p) == v:UserID() then
			return v;
		end
		
		if string.find(string.lower(v:Nick()),string.lower(tostring(p)), 1, true) then 
			return v;
		end
		if string.find(string.lower(v:RealName()),string.lower(tostring(p)), 1, true) then
			return v;
		end
		
	end
	
	return nil
end


-- Checks if a team exists.
function team.IsValidTeam( team )
	for k,v in ipairs(Lusion_Teams) do
		return table.HasValue(Lusion_Teams[v].idName, team)
	end
end

print("Loading shared util")